<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
	String path = request.getContextPath();
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<link href="<%=path%>/css/default.css" rel="stylesheet" type="text/css" />
<script src="<%=path%>/easyui/jquery-1.4.4.min.js"></script>
<script src="<%=path%>/myjs/swfupload/swfupload.js"></script>
<script src="<%=path%>/myjs/swfupload/fileprogress.js"></script>
<script src="<%=path%>/myjs/swfupload/multiFilehandlers.js"></script>
<script src="<%=path%>/myjs/swfupload/swfupload.queue.js"></script>
<script type="text/javascript">
var upload; 
$(function(){
	
	upload = new SWFUpload({  
		// 处理文件上传的url  
		upload_url: "<%=path%>/SwfUploadServlet?upload=1",
					// 上传文件限制设置  
					file_size_limit : "10240", // 10MB  
					file_types : "*.jpg;*.gif;*.png", //此处也可以修改成你想限制的类型，比如：*.doc;*.wpd;*.pdf  
					file_types_description : "Image Files",
					file_upload_limit : "0",
					//file_queue_limit : "1",  
					// 事件处理设置（所有的自定义处理方法都在handler.js文件里）  
					//file_dialog_start_handler : fileDialogStart,  
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
					file_queued_handler : fileQueued,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadSuccess,
					upload_complete_handler : uploadComplete,
					// 按钮设置  
					//button_image_url : "XPButtonUploadText_61x22.png", 
					//button_placeholder_id : "spanButtonPlaceholder", 
					button_image_url : "SmallSpyGlassWithTransperancy_17x18.png",
					button_placeholder_id : "spanButtonPlaceholder",
					button_width : 200,
					button_height : 18,
					button_text : '<span class="button">选择文件 <span class="buttonSmall">(500 MB Max)</span></span>',
					button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
					button_text_top_padding : 0,
					button_text_left_padding : 18,
					button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
					button_cursor : SWFUpload.CURSOR.HAND,
					// swf设置  
					flash_url : "swfupload/swfupload.swf",
					custom_settings : {
						upload_target : "divFileProgressContainer"
					},
					// Debug 设置  
					debug : false
				});

	});
	function startUploadFile() {
		upload.startUpload();
	}
</script>
</head>
<body>
	<div id="content">
		<form>
			<div
				style="display: inline; border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 2px;">
				<span id="spanButtonPlaceholder"></span> 
				<input id="btnUpload"
					type="button" value="上  传" onclick="startUploadFile();"
					class="btn3_mouseout" onMouseUp="this.className='btn3_mouseup'"
					onmousedown="this.className='btn3_mousedown'"
					onMouseOver="this.className='btn3_mouseover'"
					onmouseout="this.className='btn3_mouseout'" /> 
			</div>
		</form>
		<div id="divFileProgressContainer"></div>
		<div id="thumbnails">
			<table id="infoTable" border="0" width="530"
				style="display: inline; border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 2px; margin-top: 8px;">
			</table>
		</div>
	</div>
</body>
</html>